package com.zdj.websocket.controller.v1;

import com.zdj.websocket.model.InMessage;
import com.zdj.websocket.model.OutMessage;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

/**
 * @author zhangdj
 */
@Controller
public class GameInfoController {

    @MessageMapping("v1/chat")
    @SendTo("/game_chat")
    public OutMessage gameInfo(InMessage inMessage) {
        return new OutMessage(inMessage.getContent());
    }
}
